package com.hl.yyx.common.response;

import java.util.List;

/**
 * 返回List结果
 *
 */
public class ListResponse<T> extends ResponseResult implements Response {

    /**
     * 返回数据
     */
    private List<T> data;

    public ListResponse(List<T> data) {
        this.code = ResponseEnum.SUCCESS_CODE.getCode();
        this.msg = ResponseEnum.SUCCESS_CODE.getMsg();
        this.data = data;
    }

    public ListResponse(String msg, List<T> data) {
        this.msg = msg;
        this.data = data;
    }

    @Override
    public String getCode() {
        return code;
    }


    @Override
    public String getMsg() {
        return msg;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * @return the dateUtils
     */
    public List<T> getData() {
        return data;
    }

    /**
     */
    public void setData(List<T> data) {
        this.data = data;
    }

    /*
     * (non-Javadoc)
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "ListResponse [code=" + code + ", msg=" + msg + ", dateUtils=" + data + "]";
    }

}
